package com.project.controller;

import com.project.config.CommonConfig;
import com.project.vo.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Api(tags = "用户请求处理Controller")
public class TestController {

    @Autowired
    private CommonConfig commonConfig;

    @ApiOperation(value = "用户登陆方法",notes = "<span style='color:red;'>描述:</span>&nbsp;用来执行用户登录方法的接口",response = ResultVo.class)
    @RequestMapping(value = "/login",method = RequestMethod.GET)
    public ResultVo loginUser(){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(1);
        resultVo.setMessage("Login SUCCESS");

        String name = commonConfig.getName();

        String na = commonConfig.getNa();

        String value = commonConfig.getValue();

        return resultVo;
    }


}
